package com.puxsoft.example.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.puxsoft.example.domain.Customer;
import com.puxsoft.example.mapper.CustomerMapper;

@Repository
public class CustomerDao {
	
	@Autowired
	private CustomerMapper customerMapper;

	public void insertCustomer( String customerName,String phone){
		customerMapper.insertCustomer(customerName, phone);
	}

	public int insertCustomerDomain(Customer customer){
    	return customerMapper.insertCustomerDomain(customer);
    }


    public int insertUserWithOld(Customer customer){
    	return customerMapper.insertUserWithOld(customer);
    }
    
    public Customer findById(String customerId){
    	return customerMapper.findById(customerId);
    }
    
    public List<Customer> findAll(){
    	return customerMapper.findAll();
    }
    
}
